<%@include file="includes/head.jsp"%>
<%@ page import="com.pp.mariage.server.CadeauEnum"%>
<%@ page import="com.pp.mariage.server.validator.ValidationService"%>

<link rel="stylesheet" href="../css/login.css" type="text/css"
	media="all">
<style type="text/css">
h1 {
	float: none;
}
</style>
<script type="text/javascript">
	$(document).ready(function() {
		$("#montant").focus();
	});
</script>
</head>
<%
	CadeauEnum cadeau = CadeauEnum.getEnumById(request.getAttribute(
			"cadeau").toString());
	if (cadeau == null) {
		throw new IllegalStateException("Cadeau "
				+ request.getParameter("cadeau") + " inconnu");
	}
%>

<body id="page1">
	<div class="body1">
		<div class="main">
			<header style="height: 120px">
				<div class="main">
					<%@include file="includes/menu.jsp"%>
				</div>
			</header>
		</div>
	</div>
	<div class="body3">
		<div class="main">
			<!-- content -->
			<article id="content">
				<div class="wrapper">
					<form
						action="/restricted/cadeau?paiement=<%=request.getAttribute("paiement")%>&etape=2"
						method="POST">
						<div class="pad" style="padding-bottom: 20px;">
							<h2>
								Etape 2 : Montant de la participation pour l'achat <span><%=cadeau.getTitle()%>
							</h2>
						</div>
						<div>
							<%
								if (request.getAttribute("messageError") != null) {
									out.println("<span style=\"color: red;\">"
											+ request.getAttribute("messageError") + "</span>");
								}
							%>
							<input type="text" placeholder="Montant (euros)" required=""
								id="montant" name="montant"
								style="background-position: 10px 10px !important;"
								value="<%=ValidationService.manageNullValue(request
					.getAttribute("montant"))%>" />
						</div>
						<div>
							<textarea rows="10" cols="40" id="message" name="messagePerso"
								placeholder="Message Perso" style="border: 1px solid #39baf8"><%=ValidationService.manageNullValue(request
					.getAttribute("message"))%></textarea>
						</div>
						<div>
							<input type="submit" value="Suivant" />
						</div>
					</form>
				</div>
			</article>
		</div>
	</div>
	<%@include file="includes/copyright.jsp"%>
</body>
</html>